package org.numb.web.aop;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

@Aspect
@Component
public class BeforeControllerAction implements Ordered {
    @Before("@annotation(org.numb.web.aop.BeforeController)")
    public void before(final JoinPoint joinPoint) {
        // before切面业务代码
        Object[] args = joinPoint.getArgs();
        for (Object arg : args) {
        }
    }

    @After("@annotation(org.numb.web.aop.BeforeController)")
    public void after(){

    }
    @Override
    public int getOrder() {
        return 0;
    }
}
